From: Lance Lin Date: Wed, 13 Apr 2022 12:40:54 +0000 (+0700) Subject: Changed dcmtk user shell to nologin, added a check to delete the dcmtk user on uninst... X-Git-Tag: archive/raspbian/3.6.9-4+rpi1^2~104 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4bac454c0763ad05868bb93ee8581b7348ec1b3c;p=dcmtk.git Changed dcmtk user shell to nologin, added a check to delete the dcmtk user on uninstall if it exists (Closes: #987972 --- diff --git a/debian/changelog b/debian/changelog index 710b0a37..9a44ab69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dcmtk (3.6.6-6) UNRELEASED; urgency=medium + + * d/dcmtk.postrm: Added check to remove dcmtk user (Closes: #987972) + * d/dcmtk.postinst: Change dcmtk user shell to nologin + + -- Lance Lin Wed, 13 Apr 2022 19:36:57 +0700 + dcmtk (3.6.6-5) unstable; urgency=medium * d/rules: Re-exposed --interleave-none option. Closes: #1001703 diff --git a/debian/dcmtk.postinst b/debian/dcmtk.postinst index 42a34251..525636d9 100644 --- a/debian/dcmtk.postinst +++ b/debian/dcmtk.postinst @@ -11,7 +11,7 @@ if ! getent passwd dcmtk >/dev/null 2>&1; then fi echo "Adding \`dcmtk' user to system ..." adduser --quiet --system --ingroup dcmtk --home /var/lib/dcmtk/db \ - --shell /bin/sh --disabled-password dcmtk || true + --shell /usr/sbin/nologin dcmtk || true fi # work around possible adduser bug, see #119366 diff --git a/debian/dcmtk.postrm b/debian/dcmtk.postrm index 7365e3be..17d01187 100644 --- a/debian/dcmtk.postrm +++ b/debian/dcmtk.postrm @@ -15,5 +15,11 @@ if [ "$1" = "purge" ] ; then fi fi +# Remove dcmtk user/group if they exist on cleanup +if -u "dcmtk" > /dev/null 2>&1; then + echo "Removing 'dcmtk' user and group from the system...\n" + userdel dcmtk +fi + #DEBHELPER#